草庐IT

ionic 模态窗口

全部标签

javascript - 如何动态地将数据插入 ionic 滑动框Angularjs Ionic

我正在使用Ionic框架和Angularjs构建一个新闻应用程序!我正在使用ng-repeat在ion-slide-box上展示新闻,这里是一个例子:{{i.name}}{{i.gender}}{{i.age}}我想为每张幻灯片动态地将数据插入到我的ionic幻灯片盒中,所以我正在使用此代码:$scope.slideHasChanged=function(index){$scope.items.push("{name:'John',age:25,gender:'boy'}");}但这似乎不太奏效,所以如果您对我如何重新喜欢它有想法那就太好了:)这里是CODEPEN+CODE

javascript - ionic 模态不显示

我的ionic模态视图不会显示。屏幕会以某种方式变灰,但不会显示模态。请问这是怎么回事这是我的代码:原图:ContactInfo{{contact.name}}{{contact.info}}模态:EditContactNameInfoDoneController:.controller('DashCtrl',function($scope,$ionicModal){$scope.contact={name:'MittensCat',info:'Tapanywhereonthecardtoopenthemodal'}$ionicModal.fromTemplateUrl('templa

javascript - 将 ViewChild 用于动态元素 - Angular 2 和 ionic 2

我想使用多个IonicSlides我动态添加的。但是我不能使用@viewChild。请提出解决此问题的方法。Template.html://somecode组件.ts:@ViewChild('slides')slides:QueryList;....ngAfterViewInit(){setTimeout(()=>{alert(this.slides.toArray());//thislineriseerror},3000);}错误:_this.slides.toArrayisnotafunction 最佳答案 使用@ViewChi

javascript - 如何判断是 "html"还是 "body"滚动窗口

下面的代码用于通过javascript查找可以滚动的元素(body或html)。varscrollElement=(function(tags){varel,$el,init;//iteratethroughthetags...while(el=tags.pop()){$el=$(el);//ifthescrollTopvalueisalready>0thenthiselementwillworkif($el.scrollTop()>0){return$el;}//ifscrollTopis0trytoscroll.elseif($el.scrollTop(1).scrollTop()

javascript - 查找与 DOM 窗口关联的选项卡

我正在Firefox扩展中添加一些新功能,TryAgain,它会捕获HTTP错误代码(例如500)并在一段时间后自动重试加载页面。捕获代码非常有效,我正在尝试计算重试总数和storethisinthetabusingSessionStore.不幸的是,现在我正在获取对DOM窗口的引用(通过interfaceRequestor.getInterface(Components.interfaces.nsIDOMWindow)),但我需要对选项卡的引用,它是nsIDOMNode根据nsISessionStoredocsonsetTabValue().到目前为止我有什么(我已经从这个例子中删除

javascript - 延迟链接 Twitter Bootstrap 模态 ('hide' )

我正在显示一个简单的Bootstrap模态,底部有一个“结帐”按钮。点击我想要的按钮:关闭模式,例如$('#myModal').modal('隐藏')等到动画结束将window.location.href更改为我的“checkout”页面。如果不立即运行下一个函数,我似乎无法找到一种链接方式,例如$('#myModal').modal('hide').each(function(){window.location.href='/checkout';});或者我认为delay()可能会有所帮助,例如$('#myModal').modal('hide').delay(1000).each(

javascript - 在 javascript 中打开 lync 聊天窗口

我在stackoverflow上发现了我要问的相同问题,但答案没有帮助,因为据我所知,该链接没有处理javascript。IsitpossibletoopenanewLyncconversationfromawebpage?简而言之,我想使用javascript以编程方式打开Lync聊天窗口。我通过一个简单的链接完成了此操作:IM单击链接将按预期打开窗口。我正在寻找一种在javascript中复制该行为的方法:functiondoImDeveloper(){//JavascripttoopenaLyncwindow}这是在内部环境中。我希望我公司的人员能够单击一个按钮并启动与我的Lyn

javascript - 每次点击都会弹出新窗口

我有一个弹出窗口,我正在使用下面的脚本打开它。每次点击,我都想打开新的弹出窗口。我知道,为窗口设置唯一的名称将解决问题(在本例中为“SampleWindow”)。保持窗口唯一性的最佳方法是什么?还有其他方法可以管理javascript弹出窗口吗?window.open(url,'SampleWindow','WIDTH=300,HEIGHT=250'); 最佳答案 将_blank的值传递给name参数会将传递的URL加载到新窗口。像这样:window.open(url,'_blank','width=300,height=250')

javascript - 使用脚本注入(inject)打开的窗口

Thisquestion要求使用window.open打开一个新窗口,然后用脚本注入(inject)它。由于跨域安全问题,这是不可能的。但是,我的问题是我想做完全相同的事情,只是从同一个域到同一个域。这可能吗?请注意.write并不能解决这个问题,因为它首先从页面中删除所有html。 最佳答案 你可以这样做:vartheWindow=window.open('http://stackoverflow.com'),theDoc=theWindow.document,theScript=document.createElement('s

javascript - 在编辑模式下执行 CRUD 操作时选择 ionic 选择选项

我正在对多个字段执行CRUD操作。我对所有字段都有[(ngModel)]。Iamnotinterestedtochangedthenameofthe[(ngModel)]orassignanyvalueintheregister.tsoredituser.tsfilewhileloading.SinceIhavemadetheformtosavethevaluessuccessfullyintheregistermodetotheDB.IneedtoshowtheInsertedvalueintheEdituserFormandhowcaniperformthat.注意:我在两种表单中